package com.gitee.cirnochat.login.model.vo.resp;


import com.gitee.cirnochat.login.model.dto.AbstractQrCodeStatus;
import com.gitee.cirnochat.login.model.dto.DeviceInfo;
import com.gitee.cirnochat.login.model.dto.LoginQrCodeStatus;
import com.gitee.cirnochat.login.model.enums.QrCodeStatus;
import com.gitee.cirnochat.login.model.enums.QrCodeType;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import org.springframework.beans.BeanUtils;

@EqualsAndHashCode(callSuper = true)
@Data
@Schema(description = "登录二维码状态信息")
@NoArgsConstructor
public class LoginQrCodeStatusVo extends AbstractQrCodeStatus {
    @Schema(description = "登陆地点")
    private String location;

    public LoginQrCodeStatusVo(String qrId, QrCodeStatus status, QrCodeType type, DeviceInfo device, Long createTime, Long expireTime, String location ) {
        super(qrId, status,type,device, createTime, expireTime);
        this.location = location;
    }

    public LoginQrCodeStatusVo(String qrId, QrCodeStatus status,QrCodeType type) {
        super(qrId, status,type);
    }

    public LoginQrCodeStatusVo(LoginQrCodeStatus loginQrCodeStatus) {
        BeanUtils.copyProperties(loginQrCodeStatus, this);
    }


}